package client.ftp;

/**
 * 远程文件属性
 * @author self
 *
 */
public class RemoteFileAttr {

	/**
	 * 文件名
	 */
	private String fileName;

	/**
	 * 文件大小
	 */
	private String fileSize;

	/**
	 * 最后修改时间
	 */
	private String lastUpdateTime;

	/**
	 * 权限描述符
	 */
	private String permissionsStr;

	/**
	 * 是否是文件夹
	 */
	private boolean dir;

	public RemoteFileAttr(String fileName,String fileSize,String lastUpdateTime,String permissionsStr,boolean isDir){
		this.fileName=fileName;
		this.fileSize=fileSize;
		this.lastUpdateTime=lastUpdateTime;
		this.permissionsStr=permissionsStr;
		this.dir=isDir;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public String getWithFlagFileName(){
		if(dir){
			return "[D]"+fileName;
		}
		return "[F]"+fileName;
	}

	public String getFileSize() {
		return fileSize;
	}

	public void setFileSize(String fileSize) {
		this.fileSize = fileSize;
	}

	public String getLastUpdateTime() {
		return lastUpdateTime;
	}

	public void setLastUpdateTime(String lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}

	public String getPermissionsStr() {
		return permissionsStr;
	}

	public void setPermissionsStr(String permissionsStr) {
		this.permissionsStr = permissionsStr;
	}

	public boolean isDir() {
		return dir;
	}

	public void setDir(boolean dir) {
		this.dir = dir;
	}
}
